﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TinyMCE.ascx.cs" Inherits="DLV.BackEnd.Controls.TinyMCE" %>

<script src="/js/jquery.upload.js"></script>
<script src="/tinymce/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
    tinymce.init({
        selector: ".tinymce",
        plugins: [
            "advlist autolink lists link image charmap print preview hr anchor pagebreak",
            "searchreplace wordcount visualblocks visualchars code fullscreen",
            "insertdatetime media nonbreaking save table contextmenu directionality",
            "emoticons template paste textcolor"
        ],
        toolbar: "undo redo | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link imageupload | print preview media | forecolor backcolor",
        setup: function (editor) {
            editor.addButton('imageupload', {
                text: '',
                icon: 'image',
                tooltip: 'Insert/edit image',
                onclick: function () {
                    $('#fileUploadTinyMce').click();
                    setEditor(editor);
                }
            });
        },
        image_advtab: true,
        templates: [
            { title: 'Quên mật khẩu', url: '/Template/ForgetPassword.htm' },
            { title: 'Read CSHTML', url: '/Template/HtmlPage.html' },
            { title: 'Test template 2', content: 'Test 2' }
        ]
    });
</script>
<input type="file" id="fileUploadTinyMce" style="display: none;" />
<textarea id="txtContent" name="content" class="tinymce" style="width: 100%;height: 500px;"><%=Text %></textarea>